package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.BuffetDetail;
import com.ruoyi.system.mapper.BuffetDetailMapper;
import com.ruoyi.system.service.BuffetDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: ruohao
 * @Date: 2023/9/10
 **/
@Service
public class BuffetDetailServiceImpl implements BuffetDetailService {
    @Resource
    private BuffetDetailMapper buffetDetailMapper;

    @Override
    public List<BuffetDetail> selectList(BuffetDetail buffetDetail) {
        return buffetDetailMapper.selectList(buffetDetail);
    }

    @Override
    public BuffetDetail selectById(Long id) {
        return buffetDetailMapper.selectById(id);
    }

    @Override
    public Boolean create(BuffetDetail buffetDetail) {
        return buffetDetailMapper.insert(buffetDetail) == 1;
    }

    @Override
    public Boolean update(BuffetDetail buffetDetail) {
        return buffetDetailMapper.update(buffetDetail) == 1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return buffetDetailMapper.deleteById(id) == 1;
    }
}
